import vnode from './vnode'
export default function(sel, data, params) {
    // console.log(sel, data, params)
    // 没有子元素的情况
    if(typeof params === 'string') {
        return vnode(sel, data, undefined, params, undefined)
    } else if(Array.isArray(params)) { // 有子元素的情况
        let children = []
        for(let item of params) {
            children.push(item)
        }
        return vnode(sel, data, children, undefined, undefined)
    }
}